package gui.BeginDialogue;

import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.ButtonGroup;
import javax.swing.JRadioButton;

public class ButtonSetMode extends JRadioButton implements ActionListener {


	private static final long serialVersionUID = 3219013736802186967L;
	private IBeginDialog dialog;
	private static ButtonGroup bg = new ButtonGroup();
	
	public ButtonSetMode(String text,boolean select,IBeginDialog ibg) {
		super(text,select);
		this.setHorizontalAlignment(FlowLayout.LEFT);
		dialog=ibg;
		addActionListener(this);
		bg.add(this);
	}

	@Override
	public void actionPerformed(ActionEvent arg0) {
		dialog.setMode();
	}

}
